// rollup.config.js
import babel from '@rollup/plugin-babel';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import { uglify } from "rollup-plugin-uglify";
const isProd = process.env.NODE_ENV === 'production' ? true : false;
let plugins = [
  babel({
    babelHelpers: 'bundled',
    exclude: 'node_modules/**'
  }),
  resolve(),
  commonjs()
];
if (isProd) {
  plugins.push(uglify());
}
export default {
  input: './src/index.js',
  output: {
    file: isProd ? './lib/index.min.js' : './lib/index.js',
    format: 'umd',
    name: 'Notice'
  },
  plugins
};